import allure
import pytest
import yaml
from selenium import webdriver
import os
import requests
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
binary = FirefoxBinary(f'C:\Program Files\Mozilla Firefox/firefox.exe')


"""
1、公共函数放入此文件，跟项目，页面无关的封装，如浏览器封装等等
"""

def chrome():
    driver = webdriver.Chrome()
    return driver


def firefox():
    driver = webdriver.Firefox(firefox_binary=binary)
    return driver


def session():
    s = requests.sessions()
    return s


def login_s():
    """
    公共调用的登录，在conftest中的登录前置来调用这个函数
    :return:
    """
    pass

